// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_PROD_PLAN_ORDER
// * CreateDate    : 2012/7/20 23:14:17
// * Creater       : CodeSmith
// * LastChangeDate: 2012/7/20 23:14:17
// * LastChanger   : 2012/7/20 23:14:17
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class ProdPlanOrderEntity : EntityBase
    {
        public ProdPlanOrderTable TableSchema
        {
            get
            {
                return ProdPlanOrderTable.Current;
            }
        }

        public ProdPlanOrderEntity()
        {

        }

        public ProdPlanOrderEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.PlanOrderId = Convert.ToString(CommonFunctions.ToObject(dr["PLAN_ORDER_ID"]));
            this.PlanOrderCode = Convert.ToString(CommonFunctions.ToObject(dr["PLAN_ORDER_CODE"]));
            this.ApplicationItemId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ITEM_ID"]));
            this.BlueprintId = Convert.ToString(CommonFunctions.ToObject(dr["BLUEPRINT_ID"]));
            this.BomId = Convert.ToString(CommonFunctions.ToObject(dr["BOM_ID"]));
            this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
            this.DeliveryDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["DELIVERY_DATE"]));
            this.ProductStatus = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_STATUS"]));
            this.LocationCode = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_CODE"]));
            this.PlanOrderPersn = Convert.ToString(CommonFunctions.ToObject(dr["PLAN_ORDER_PERSN"]));
            this.PlanOrderDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["PLAN_ORDER_DATE"]));
            this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
            this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
            this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
            this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.AssembleReportQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["ASSEMBLE_REPORT_QTY"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.IsMark = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_MARK"]));
            this.OrderStatus = Convert.ToInt32(CommonFunctions.ToObject(dr["ORDER_STATUS"]));
            this.ChangedOrderId = Convert.ToString(CommonFunctions.ToObject(dr["CHANGED_ORDER_ID"]));
        }

        public ProdPlanOrderEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.PlanOrderId = Convert.ToString(CommonFunctions.ToObject(dr["PLAN_ORDER_ID"]));
            this.PlanOrderCode = Convert.ToString(CommonFunctions.ToObject(dr["PLAN_ORDER_CODE"]));
            this.ApplicationItemId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ITEM_ID"]));
            this.BlueprintId = Convert.ToString(CommonFunctions.ToObject(dr["BLUEPRINT_ID"]));
            this.BomId = Convert.ToString(CommonFunctions.ToObject(dr["BOM_ID"]));
            this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
            this.DeliveryDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["DELIVERY_DATE"]));
            this.ProductStatus = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_STATUS"]));
            this.LocationCode = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_CODE"]));
            this.PlanOrderPersn = Convert.ToString(CommonFunctions.ToObject(dr["PLAN_ORDER_PERSN"]));
            this.PlanOrderDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["PLAN_ORDER_DATE"]));
            this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
            this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
            this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
            this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.AssembleReportQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["ASSEMBLE_REPORT_QTY"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.IsMark = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_MARK"]));
            this.OrderStatus = Convert.ToInt32(CommonFunctions.ToObject(dr["ORDER_STATUS"]));
            this.ChangedOrderId = Convert.ToString(CommonFunctions.ToObject(dr["CHANGED_ORDER_ID"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return ProdPlanOrderTable.Current;
            }
        }

        #region Perporty List
        public string PlanOrderId
        {
            get { return Convert.ToString(GetData(ProdPlanOrderTable.C_PLAN_ORDER_ID)); }
            set { SetData(ProdPlanOrderTable.C_PLAN_ORDER_ID, value); }
        }

        public string PlanOrderCode
        {
            get { return Convert.ToString(GetData(ProdPlanOrderTable.C_PLAN_ORDER_CODE)); }
            set { SetData(ProdPlanOrderTable.C_PLAN_ORDER_CODE, value); }
        }

        public string ApplicationItemId
        {
            get { return Convert.ToString(GetData(ProdPlanOrderTable.C_APPLICATION_ITEM_ID)); }
            set { SetData(ProdPlanOrderTable.C_APPLICATION_ITEM_ID, value); }
        }

        public string BlueprintId
        {
            get { return Convert.ToString(GetData(ProdPlanOrderTable.C_BLUEPRINT_ID)); }
            set { SetData(ProdPlanOrderTable.C_BLUEPRINT_ID, value); }
        }

        public string BomId
        {
            get { return Convert.ToString(GetData(ProdPlanOrderTable.C_BOM_ID)); }
            set { SetData(ProdPlanOrderTable.C_BOM_ID, value); }
        }

        public decimal Qty
        {
            get { return Convert.ToDecimal(GetData(ProdPlanOrderTable.C_QTY)); }
            set { SetData(ProdPlanOrderTable.C_QTY, value); }
        }

        public DateTime DeliveryDate
        {
            get { return Convert.ToDateTime(GetData(ProdPlanOrderTable.C_DELIVERY_DATE)); }
            set { SetData(ProdPlanOrderTable.C_DELIVERY_DATE, value); }
        }

        public string ProductStatus
        {
            get { return Convert.ToString(GetData(ProdPlanOrderTable.C_PRODUCT_STATUS)); }
            set { SetData(ProdPlanOrderTable.C_PRODUCT_STATUS, value); }
        }

        public string LocationCode
        {
            get { return Convert.ToString(GetData(ProdPlanOrderTable.C_LOCATION_CODE)); }
            set { SetData(ProdPlanOrderTable.C_LOCATION_CODE, value); }
        }

        public string PlanOrderPersn
        {
            get { return Convert.ToString(GetData(ProdPlanOrderTable.C_PLAN_ORDER_PERSN)); }
            set { SetData(ProdPlanOrderTable.C_PLAN_ORDER_PERSN, value); }
        }

        public DateTime PlanOrderDate
        {
            get { return Convert.ToDateTime(GetData(ProdPlanOrderTable.C_PLAN_ORDER_DATE)); }
            set { SetData(ProdPlanOrderTable.C_PLAN_ORDER_DATE, value); }
        }

        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(ProdPlanOrderTable.C_CREATED_DATE)); }
            set { SetData(ProdPlanOrderTable.C_CREATED_DATE, value); }
        }

        public string CreatedBy
        {
            get { return Convert.ToString(GetData(ProdPlanOrderTable.C_CREATED_BY)); }
            set { SetData(ProdPlanOrderTable.C_CREATED_BY, value); }
        }

        public DateTime LastModifiedDate
        {
            get { return Convert.ToDateTime(GetData(ProdPlanOrderTable.C_LAST_MODIFIED_DATE)); }
            set { SetData(ProdPlanOrderTable.C_LAST_MODIFIED_DATE, value); }
        }

        public string LastModifiedBy
        {
            get { return Convert.ToString(GetData(ProdPlanOrderTable.C_LAST_MODIFIED_BY)); }
            set { SetData(ProdPlanOrderTable.C_LAST_MODIFIED_BY, value); }
        }

        public string Status
        {
            get { return Convert.ToString(GetData(ProdPlanOrderTable.C_STATUS)); }
            set { SetData(ProdPlanOrderTable.C_STATUS, value); }
        }

        public decimal AssembleReportQty
        {
            get { return Convert.ToDecimal(GetData(ProdPlanOrderTable.C_ASSEMBLE_REPORT_QTY)); }
            set { SetData(ProdPlanOrderTable.C_ASSEMBLE_REPORT_QTY, value); }
        }

        public string Remark
        {
            get { return Convert.ToString(GetData(ProdPlanOrderTable.C_REMARK)); }
            set { SetData(ProdPlanOrderTable.C_REMARK, value); }
        }

        public int IsMark
        {
            get { return Convert.ToInt32(GetData(ProdPlanOrderTable.C_IS_MARK)); }
            set { SetData(ProdPlanOrderTable.C_IS_MARK, value); }
        }

        public int OrderStatus
        {
            get { return Convert.ToInt32(GetData(ProdPlanOrderTable.C_ORDER_STATUS)); }
            set { SetData(ProdPlanOrderTable.C_ORDER_STATUS, value); }
        }

        public string ChangedOrderId
        {
            get { return Convert.ToString(GetData(ProdPlanOrderTable.C_CHANGED_ORDER_ID)); }
            set { SetData(ProdPlanOrderTable.C_CHANGED_ORDER_ID, value); }
        }

        #endregion
    }


}

